package SinglePattern.HangleModel;

import SinglePattern.HangleModel.HangleModel;

/**
 * 标准的懒汉式:
 *              优点：没有加锁，执行效率会提高。
 *              缺点：类加载时就初始化，浪费内存。
 * @author
 * @create 2018-10-18 11:26
 **/
public class HangleModel1 {
    private HangleModel1(){}

    private static final HangleModel1 instance = new HangleModel1();

    public static HangleModel1 getInstance(){
        return instance;
    }

    public void hangleMode1Hello(){
        System.out.println("HangleMode1 Hello!");
    }


}
